package com.zmkj.cn.sys.util;

import com.zmkj.cn.comm.exception.BaseException;
import com.zmkj.cn.comm.listener.InitDataListener;
import org.springframework.stereotype.Component;

/**
 * @author : 伍绍宇 Coy
 **/
@Component
public class CommUtil {

    private void userNotNull(Integer userId, String source){
        if (userId == null){
            throw new BaseException(source + "用户不能为空");
        }
        if (InitDataListener.userMap.get(userId) == null){
            throw new BaseException(source + "用户不存在");
        }
    }

}